รหัสสินค้า | M1879 |
หมวดหมู่ | ESP32 ESP-32 |
ราคา | 250.00 บาท |
น้ำหนัก | 40 กรัม |
สถานะสินค้า | พร้อมส่ง |
ลงสินค้า | 27 มี.ค. 2561 |
อัพเดทล่าสุด | 3 ธ.ค. 2567 |
จำนวน | ชิ้น |
NodeMCU: https://github.com/nodemcu/nodemcu-firmware/tree/dev-esp32
Arduino: https://github.com/espressif/arduino-esp32
1.4.1 CPU and Memory
|
/*
* There are three serial ports on the ESP known as U0UXD, U1UXD and U2UXD.
*
* U0UXD is used to communicate with the ESP32 for programming and during reset/boot.
* U1UXD is unused and can be used for your projects. Some boards use this port for SPI Flash access though
* U2UXD is unused and can be used for your projects.
*
*/
#define RXD2 16
#define TXD2 17
void setup() {
// Note the format for setting a serial port is as follows: Serial2.begin(baud-rate, protocol, RX pin, TX pin);
Serial.begin(115200);
//Serial1.begin(9600, SERIAL_8N1, RXD2, TXD2);
Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2);
Serial.println("Serial Txd is on pin: "+String(TX));
Serial.println("Serial Rxd is on pin: "+String(RX));
}
void loop() { //Choose Serial1 or Serial2 as required
while (Serial2.available()) {
Serial.print(char(Serial2.read()));
}
}
|
หน้าที่เข้าชม | 5,181,193 ครั้ง |
ผู้ชมทั้งหมด | 1,580,533 ครั้ง |
ร้านค้าอัพเดท | 22 ต.ค. 2568 |